<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center list_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub list_fd0_0'>
          <view class='flex flex-wrap align-center list_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
            data-url="1">
            <text class='fu-iconfont2  list_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='list_fd0_0_c1_c0'>任务列表</text>
          </view>
          <view class='flex flex-wrap align-center justify-end list_fd0_0_c0'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view class="flex benben-flex-layout flex-wrap align-center list_flex_1">
        <view>
          <benben-flex-tabs class-name='list_benbenTabsfd1_0' v-model="tabsTypefd1_0" ref="benben_tabsfd1_0"
            select-mark="benben_tabsfd1_0" key="benben_tabsfd1_0" :open-title-type='false' :open-sticky='true' :top='0'
            @change="getListFunc()" :is-show-content='false' :scrollspy='false' :tabs-info.sync="tabsInfofd1_0">

            <scroll-view @scroll="tabsInfofd1_0.scrollX = $event.detail.scrollLeft" id="benben_tabsfd1_0"
              class="benben-tabs" style="width:750rpx" :scroll-x="true" :scroll-left.sync="tabsInfofd1_0.moveX"
              scroll-with-animation="all .3s ease">
              <view class="benben-tabs-content" id="benben_tabsfd1_0-content">
                <view id="benben_tabsfd1_0-title" class="benben-tabs-title flex flex align-center justify-around">
                  <view :class="{ 'checkTitlefd1_0': tabsTypefd1_0 == '0', 'flex flex-wrap align-center': true }"
                    @tap="tabsTypefd1_0 = '0'" :id="`benben_tabsfd1_0-title-item-${'0'}`">

                    <text>全部</text>

                  </view>
                  <view :class="{ 'checkTitlefd1_0': tabsTypefd1_0 == '1', 'flex flex-wrap align-center': true }"
                    @tap="tabsTypefd1_0 = '1'" :id="`benben_tabsfd1_0-title-item-${'1'}`">

                    <text>待完成</text>

                  </view>
                  <view :class="{ 'checkTitlefd1_0': tabsTypefd1_0 == '2', 'flex flex-wrap align-center': true }"
                    @tap="tabsTypefd1_0 = '2'" :id="`benben_tabsfd1_0-title-item-${'2'}`">

                    <text>已完成</text>

                  </view>
                </view>
                <view :style="{ left: tabsInfofd1_0.lineleft, maxWidth: tabsInfofd1_0.lineWidth ,}"
                  id="benben_tabsfd1_0-line" class="benben-tabs-line flex benben-flex-tabs-line list_linefd1_0"></view>
              </view>
            </scroll-view>

          </benben-flex-tabs>

        </view>
      </view>

      <!---flex布局flex布局结束-->
      <!---flex布局flex布局开始-->
      <view class="flex benben-flex-layout flex-wrap align-center">
        <view class='flex flex-direction align-stretch list_fd2_0' @tap.stop="handleJumpDiy" data-type="navigateTo"
          v-for="(item,key0) in dataList" :key="key0" :data-url="`/pages/grzx/listDetail/listDetail?id=${item.aid}`">
          <view class='flex flex-wrap align-center justify-between flex-sub'>
            <text class='list_fd2_0_c0_c0'>任务标题：</text>
            <text class='list_fd2_0_c0_c1'>{{item.renwubiaoti}}</text>
          </view>
          <view class='flex flex-wrap align-center justify-between flex-sub list_fd2_0_c1'>
            <text class='list_fd2_0_c0_c0'>任务描述：</text>
            <view class='text-cut list_fd2_0_c0_c1'>{{item.renwumiaoshu}}</view>
          </view>
          <view class='flex flex-wrap align-center justify-between flex-sub'>
            <text class='list_fd2_0_c0_c0'>任务下发时间：</text>
            <text class='list_fd2_0_c0_c1'>{{item.xiafashijian}}</text>
          </view>
          <view class='flex flex-wrap align-center justify-between flex-sub list_fd2_0_c3'>
            <text class='list_fd2_0_c0_c0'>任务截至时间：</text>
            <text class='list_fd2_0_c0_c1'>{{item.jiezhishijian}}</text>
          </view>
          <view class='flex flex-wrap align-center justify-between list_fd2_0_c4'>
            <text class='list_fd2_0_c4_c0'>{{item.zhuangtai_name}}</text>
            <button class='list_fd2_0_c4_c1'>查看任务</button>
          </view>
        </view>
      </view>

      <!---flex布局flex布局结束-->
      <fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
        :listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>

    </view>
  </view>
</template>
<script>
  import pagingList from '@/common/mixin/paging_list.js';
  export default {
    components: {},
    mixins: [pagingList],

    data() {
      return {
        "tabsInfofd1_0": {
          lineleft: '',
          lineWidth: '',
          moveX: 0,
          scrollX: 0,
          PageScrollX: 0
        },
        "tabsTypefd1_0": "0",
        dataList: [],
        "minixPagingListsApi": "",
        "pageingListApiMethod": "",
        "allowOnloadGetList": false,
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {

    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {
      this.getListFunc()
    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      getListFunc() {
        this.minixPagingListsApi = global.apiUrls.post66262dc451a36;
        this.pageingListApiMethod = 'post';
        this.allowOnloadGetList = false;
        this.pagingListPostDataContent = {
          zhuangtai: this.tabsTypefd1_0
        }
        this.listData = [];
        this.dataList = this.listData;
        this.pagingListToggle();

      },
      pagingListPostData() {
        return this.pagingListPostDataContent
      },
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: #F8F8F8;
    background-size: 100% auto;
  }

  .list_flex_0 {
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .list_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .list_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .list_fd0_0_c0 {
    width: 120rpx;
  }

  .list_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .list_flex_1 {
    margin: 0rpx 0rpx 24rpx 0rpx;
  }

  .list_linefd1_0 {
    background: rgba(2, 133, 251, 1);
    width: 50rpx;
    height: 8rpx;
    top: 80rpx;
    background-size: 100% auto !important;
    border-radius: 16rpx;
  }

  .checkTitlefd1_0 {
    font-weight: 700 !important;
    font-size: 28rpx !important;
    color: #0285FB !important;
    background-color: rgba(255, 255, 255, 1) !important;
  }

  ::v-deep .list_benbenTabsfd1_0 {
    background: #fff;
    width: 750rpx;
    height: 90rpx;
    white-space: nowrap;
    text-align: center;
  }

  .list_fd2_0_c4_c1 {
    background: rgba(0, 119, 255, 1);
    border-radius: 33rpx 33rpx 33rpx 33rpx;
    width: 160rpx;
    line-height: 64rpx;
    font-size: 28rpx;
    color: #fff;
    height: 64rpx;
  }

  .list_fd2_0_c4_c0 {
    background: rgba(255, 128, 0, 0.1);
    color: rgba(255, 128, 0, 1);
    font-size: 22rpx;
    width: 98rpx;
    line-height: 40rpx;
    border-radius: 4rpx 4rpx 4rpx 4rpx;
    text-align: center;
  }

  .list_fd2_0_c4 {
    margin: 24rpx 0rpx 0rpx 0rpx;
  }

  .list_fd2_0_c3 {
    border-bottom: 1px solid #eee;
    margin: 24rpx 0rpx 0rpx 0rpx;
    padding: 0rpx 0rpx 24rpx 0rpx;
  }

  .list_fd2_0_c1 {
    margin: 24rpx 0rpx 24rpx 0rpx;
  }

  .list_fd2_0_c0_c1 {
    color: var(--benbenFontColor0);
    font-weight: 600;
    max-width: 450rpx;
  }

  .list_fd2_0_c0_c0 {
    color: rgba(102, 102, 102, 1);
  }

  .list_fd2_0 {
    background: var(--benbenbgColor1);
    width: 710rpx;
    background-size: 100% auto;
    border-radius: 16rpx;
    margin: 0rpx auto 24rpx auto;
    padding: 24rpx;
  }
</style>
